package priv.pront.code.lanqiao.team.comp.mati_2;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-02 22:33
 */
public class P1152_欢乐的挑 {

    static int n;
    static int[] a;

    static Set<Integer> set = new HashSet<>();

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
        }
        for (int i = 1; i < n; i++) {
            set.add(i);
        }

        for (int i = 0; i < n - 1; i++) {
            int j = i + 1;
            int value = Math.abs(a[i] - a[j]);
            set.remove(value);
        }
        if (set.size() == 0) {
            System.out.println("Jolly");
        } else {
            System.out.println("Not jolly");
        }
    }
}
